package org.aepscolombia.platform.models.entity;
// Generated Apr 8, 2014 9:37:27 AM by Hibernate Tools 3.2.1.GA


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Flowering generated by hbm2java
 */
@Entity
@Table(name="flowering"
    , uniqueConstraints = @UniqueConstraint(columnNames="id_production_event_flo") 
)
public class Flowering  implements java.io.Serializable {


     private Integer idFlo;
     private ProductionEvents productionEvents;
     private String monthsFlo;
     private Boolean status;
     private Integer createdBy;

    public Flowering() {
    }

	
    public Flowering(ProductionEvents productionEvents, String monthsFlo) {
        this.productionEvents = productionEvents;
        this.monthsFlo = monthsFlo;
    }
    public Flowering(ProductionEvents productionEvents, String monthsFlo, Boolean status, Integer createdBy) {
       this.productionEvents = productionEvents;
       this.monthsFlo = monthsFlo;
       this.status = status;
       this.createdBy = createdBy;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_flo", unique=true, nullable=false)
    public Integer getIdFlo() {
        return this.idFlo;
    }
    
    public void setIdFlo(Integer idFlo) {
        this.idFlo = idFlo;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_production_event_flo", unique=true, nullable=false)
    public ProductionEvents getProductionEvents() {
        return this.productionEvents;
    }
    
    public void setProductionEvents(ProductionEvents productionEvents) {
        this.productionEvents = productionEvents;
    }
    
    @Column(name="months_flo", nullable=false, length=9)
    public String getMonthsFlo() {
        return this.monthsFlo;
    }
    
    public void setMonthsFlo(String monthsFlo) {
        this.monthsFlo = monthsFlo;
    }
    
    @Column(name="status")
    public Boolean getStatus() {
        return this.status;
    }
    
    public void setStatus(Boolean status) {
        this.status = status;
    }
    
    @Column(name="created_by")
    public Integer getCreatedBy() {
        return this.createdBy;
    }
    
    public void setCreatedBy(Integer createdBy) {
        this.createdBy = createdBy;
    }




}


